import {message, notification, Modal} from 'antd';
import './style.less';
import './utils/rules'; // amis 自定义校验
import './utils/request';
import './utils/history';
import LeftNav from './layout/components/LeftNav';
import TopHeader from './layout/components/TopHeader';

// window
window.LeftNav = LeftNav;
window.TopHeader = TopHeader;

window.$tools = {
  message, // https://ant.design/components/message-cn/#header
  notification, // https://ant.design/components/notification-cn/#header
  Modal // https://ant.design/components/modal-cn/#Modal.method()
};

// amis custom components
let amisLib = amisRequire('amis');

import LoginPagePassword from './components/loginPage/LoginPagePassword'

amisLib.Renderer({
  test: /^login-page$/
})(LoginPagePassword);

import LoginPagePhone from './components/loginPage/LoginPagePhone'

amisLib.Renderer({
  test: /^login-page-phone$/
})(LoginPagePhone);

import Workbench from './components/workbench'

amisLib.Renderer({
  test: /(^|\/)workbench/
})(Workbench);
//
import AuthSelect from './components/authSelect'

amisLib.FormItem({
  type: 'auth-select',
})(AuthSelect);

import PointImage from './components/pointImage';

amisLib.FormItem({
  type: 'point-image',
})(PointImage);
